import os
import unittest
from cases.Base_Case import BASECASE
from config.config import DATA_PATH
from page.index import IndexPage
from page.住院管理.住院登记.zhuyuandengji__page import zhuyuandengji
from tools.sjqd_way import read_data_from_excel
class TestZhuyuandengji(BASECASE):
    @classmethod
    def setUpClass(cls):
        ap = IndexPage()
        ap.jrym_no1('住院登记')
    @classmethod
    def tearDownClass(cls):
        ap = IndexPage()
        ap.close_all_xxk()
        print("{}执行完毕-------------------------------------------------".format(cls))
    def test_zhuyuandengji(self):
        self.data = read_data_from_excel(os.path.join(DATA_PATH, "datas.xls"), "住院患者基础信息")
        brfb,fffs,rybq,ryks,rytj,xyjb,xxdz = self.data[0]
        bp = zhuyuandengji()
        bp.max_window()#最大化窗口
        bp.creat_zyhz(brfb,fffs,rybq,ryks,rytj,xyjb,xxdz)
        bp.close_window()#关闭窗口
if __name__ == '__main__':
    unittest.main()
